package org.swift.mashup.engine.model;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

public class Parameter {
	
	private String name;
	
	private String value;
	
	public Parameter(String name, String value) {
		this.name = name;
		this.value = value;
	}

	public String getName() {
		return name;
	}

	public String getValue() {
		return value;
	}
	
	public static Map<String, Object>toValueMap(Collection<? extends Parameter> params) {
		Map<String, Object> map = new HashMap<String, Object>();
		for(Parameter param: params) {
			map.put(param.getName(), param.getValue());
		}
		return map;
	}

}
